home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 10 / FM Towns Free Software Collection 10.iso / ms_dos / tool / dmove86 / dmove86.h < prev    next >
Text File  |  1995-02-15  |  2KB  |  105 lines

  1. /*
  2.  
  3. dmove86.h Version 2.00c
  4. Copyright (c) 1993,94 Delmonta
  5.  
  6. */
  7.  
  8. #pragma recursive
  9. #pragma    optimize space
  10.  
  11. struct    SECTBL
  12. {
  13.     unsigned long        num;
  14.     struct DIRENTRY far    *buf;
  15.     struct SECTBL        *next;
  16. };
  17.  
  18. struct DPB
  19. {
  20.     unsigned char    drive;
  21.     unsigned char    unitno;
  22.     unsigned int    seclen;
  23.     unsigned char    sec_clu;
  24.     unsigned char    shiftcount;
  25.     unsigned int    iplsectors;
  26.     unsigned char    fatnum;
  27.     unsigned int    root_entry;
  28.     unsigned int    data_sec;
  29.     unsigned int    maxclu;
  30.  
  31. };
  32.  
  33. struct    DIRENTRY
  34. {
  35.     char        filename[8];
  36.     char        extname[3];
  37.     char        attr;
  38.     
  39.     char        dummy[10];
  40.  
  41.     unsigned int    time;
  42.     unsigned int    date;
  43.  
  44.     unsigned int    cluster;
  45.     unsigned long    filesize;
  46. };
  47.  
  48. #ifdef    LSI_C
  49.     #define    huge    far
  50. #endif
  51.  
  52. #ifdef    MAIN
  53.     #define    GLOVAL /* */
  54. #else
  55.     #define    GLOVAL    extern
  56. #endif
  57.  
  58. GLOVAL    int            Drive;
  59. GLOVAL    struct    DPB        Dpb;
  60. GLOVAL    unsigned        Fatsize;
  61. GLOVAL    unsigned short huge    *Fat;
  62. GLOVAL    struct DIRENTRY    far    **Dirtbl;
  63. GLOVAL    unsigned        Dirnum;
  64.  
  65. /* fat_dpb.c */
  66. int        getdpb(void);
  67. unsigned short huge *getfat(void);
  68.  
  69. /* dmove86.c */
  70. int        main(int argc,char *argv[]);
  71. void        endscreen(void);
  72.  
  73. /* console.c */
  74.  
  75. char        dm_errmes(char *s);
  76. void        mkscreen(void);
  77. char        dm_getch(void);
  78. void        dm_ungetch(char c);
  79. int        strinput(char *buf,unsigned len);
  80.  
  81. /* sectbl.c */
  82. struct DIRENTRY far **readentry(struct DIRENTRY far *parent,
  83.                     struct SECTBL **sectbl,int *dirnum);
  84. void        freesectbl(struct SECTBL *sectbl);
  85. void        writedir(struct SECTBL *sectbl, struct DIRENTRY far **dirtbl);
  86.  
  87. /* dmsort.c */
  88. int        dmsort(unsigned start,unsigned end);
  89.  
  90. /* dmrename.c */
  91. int        dmrename(unsigned no);
  92.  
  93. /* abssec2.a86 */
  94. unsigned    readabssec (void far *,unsigned long,unsigned,int);
  95. unsigned    writeabssec(void far *,unsigned long,unsigned,int);
  96.  
  97. #define    CL2SEC(c)    ( Dpb.data_sec + ((long)(c)-2)*(Dpb.sec_clu+1) )
  98. #define    DIRSEC        (Dpb.seclen / sizeof(struct DIRENTRY))
  99.  
  100.                 /* カーソルキーの仮想文字コード */
  101. #define    RIGHTKEY    '\x1c'
  102. #define    LEFTKEY        '\x08'
  103. #define    UPKEY        '\x1e'
  104. #define    DOWNKEY        '\x1f'
  105.